package ${package.Stereotype}.vo;

import com.github.pagehelper.PageInfo;
import lombok.Data;
import org.springframework.util.ObjectUtils;

@Data
public class LayuiTableVo {

    private Integer code = 0;

    private String msg = "";

    private Integer count = 0;

    private Object data;

    public LayuiTableVo(PageInfo<?> data){
        if(!ObjectUtils.isEmpty(data)){
            this.data = data.getList();
            this.count = Math.toIntExact(data.getTotal());
        }
    }

}
